Fix Selectable state for gailButton
authorMike Gorse <mgorse@boston.site>
Thu, 23 Apr 2009 13:36:51 +0000 (14:36 +0100)
committerMike Gorse <mgorse@boston.site>
Thu, 23 Apr 2009 13:36:51 +0000 (14:36 +0100)
Only remove Selectable state from a GailButton if it is not Focusable (ie,
a TreeView column header); do not add Selectable for all focusable
buttons.  Fixes a bug introduced with the fix to 433324.

modules/other/gail/gailbutton.c

index 01c6778f4b76594cb2865eeb0d4ae4df45bfaa65..b8ab7cd77d68c7728417c4159ffebcfc286fab7d 100644 (file)
@@ -889,9 +889,7 @@ gail_button_ref_state_set (AtkObject *obj)
   if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE)
     atk_state_set_add_state (state_set, ATK_STATE_ARMED);
 
-  if (GTK_WIDGET_CAN_FOCUS(widget))
-    atk_state_set_add_state (state_set, ATK_STATE_SELECTABLE);
-  else
+  if (!GTK_WIDGET_CAN_FOCUS(widget))
     atk_state_set_remove_state (state_set, ATK_STATE_SELECTABLE);